package graph.drawingshapes.tools
{
	import flash.display.BitmapData;
	import flash.geom.Point;
	
	import graph.drawingshapes.IBitmapDataDrawable;
	
	public class PaintBucketDrawingTool extends DrawingTool implements IBitmapDataDrawable 
	{
		public function PaintBucketDrawingTool(color:uint=DefaultColor, alpha:Number=DefaultAlpha)
		{
			super(color, alpha);
		}
		
		public function drawOnBitmapData(bitmapData : BitmapData, point : Point) : BitmapData
		{
			bitmapData.floodFill(point.x, point.y, this.color);
		}
	}
}